package com.lion.appletrip;



import com.lion.appletrip.utils.PreferenceUtils;
import com.umeng.analytics.MobclickAgent;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

public class LanchActivity extends Activity
{
	private ImageView mImageView;
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_lanch);
		mImageView = (ImageView) findViewById(R.id.imageView_lauch);
		Animation animation = AnimationUtils.loadAnimation(LanchActivity.this,
		        R.anim.logo_anima);
		mImageView.setAnimation(animation);
		mImageView.postDelayed(new Runnable()
		{

			@Override
			public void run()
			{
				boolean guide = PreferenceUtils.getGuide(LanchActivity.this);
				if (!guide)
                {
					startActivity(new Intent(LanchActivity.this,
							ToNewGuidMainActivity.class));
                }else {
                	startActivity(new Intent(LanchActivity.this,
                			MainActivity.class));
				}
				finish();
			}
		}, 3000);
	}
	@Override
	protected void onResume()
	{
		
	    super.onResume();
	    MobclickAgent.onResume(this);
	}
	@Override
	protected void onPause()
	{
		MobclickAgent.onPause(this);
	    super.onPause();
	}
}
